package com.holyant.report.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class RptBrandInventoryInfoDto {

    @ApiModelProperty(name = "销量")
    private BigDecimal salesQty;

    @ApiModelProperty(name = "期初库存/罐")
    private BigDecimal beginningInventoryQty;

    @ApiModelProperty(name = "采购入库/罐")
    private BigDecimal procurementWarehousingQty;

    @ApiModelProperty(name = "期末库存/罐")
    private BigDecimal endInventoryQty;

    @ApiModelProperty(name = "采购在途")
    private BigDecimal procurementInTransitQty;

    @ApiModelProperty(name = "调拨在途")
    private BigDecimal transfersInTransitQty;

    @ApiModelProperty(name = "到货破损/罐")
    private BigDecimal toCargoBrokenQty;

    @ApiModelProperty(name = "退货/罐")
    private BigDecimal salesReturnQty;

    @ApiModelProperty(name = "FM国内库存/罐")
    private BigDecimal fmInternal;

    @ApiModelProperty(name = "FM香港库存")
    private BigDecimal fmOverseas;

    public boolean isZero() {
        return BigDecimal.ZERO.compareTo(salesQty) == 0 &&
                BigDecimal.ZERO.compareTo(beginningInventoryQty) == 0 &&
                BigDecimal.ZERO.compareTo(procurementWarehousingQty) == 0 &&
                BigDecimal.ZERO.compareTo(endInventoryQty) == 0 &&
                BigDecimal.ZERO.compareTo(procurementInTransitQty) == 0 &&
                BigDecimal.ZERO.compareTo(transfersInTransitQty) == 0 &&
                BigDecimal.ZERO.compareTo(toCargoBrokenQty) == 0 &&
                BigDecimal.ZERO.compareTo(salesReturnQty) == 0 &&
                BigDecimal.ZERO.compareTo(fmInternal) == 0 &&
                BigDecimal.ZERO.compareTo(fmOverseas) == 0;
    }
}
